Manages the cameras recorded. More...
Public Member Functions | |
| Camera * | getActiveRenderCamera () const |
| Camera * | getActiveCullingCamera () const |
| Camera * | getActiveLodCamera () const |
| Camera * | getDefaultCamera () const |
| void | setActiveRenderCamera (Camera *cam) |
| void | setActiveCullingCamera (Camera *cam) |
| void | setActiveLodCamera (Camera *cam) |
| void | setDefaultCamera (Camera *cam) |
| void | resetRenderCameraToDefault () |
| void | resetCullingCameraToDefault () |
| void | resetLodCameraToDefault () |
| void | prepareForContext (RenderContext *context) |
Public Member Functions inherited from nkGraphics::Manager< Camera > | |
| Camera * | createOrRetrieve (nkMemory::StringView name) |
| Camera * | record (nkMemory::StringView name, nkMemory::UniquePtr< Camera > resource) |
| Camera * | get (nkMemory::StringView name) const |
| Camera * | getByIndex (unsigned int index) const |
| void | rename (nkMemory::StringView currentName, nkMemory::StringView newName) |
| void | erase (nkMemory::StringView name) |
| nkMemory::UniquePtr< Camera > | relinquish (nkMemory::StringView name) |
Manages the cameras recorded.
Camera creation / deletion can go through this class, allowing it to act as a repository of resources which lifetime will get managed as needed. Like any Manager, it is always owning the memory it owns, unless it passes back the ownership explicitly.
| Camera* nkGraphics::CameraManager::getActiveRenderCamera | ( | ) | const |
| Camera* nkGraphics::CameraManager::getActiveCullingCamera | ( | ) | const |
| Camera* nkGraphics::CameraManager::getActiveLodCamera | ( | ) | const |
| Camera* nkGraphics::CameraManager::getDefaultCamera | ( | ) | const |
| void nkGraphics::CameraManager::setActiveRenderCamera | ( | Camera * | cam | ) |
Sets the active render cam to use. Serves as a reference for feeding shaders with matrices during a pass.
| cam | The camera to use. |
| void nkGraphics::CameraManager::setActiveCullingCamera | ( | Camera * | cam | ) |
Sets the active culling cam to use. Serves as a reference for culling render queues rendered during a pass.
| cam | The camera to use. |
| void nkGraphics::CameraManager::setActiveLodCamera | ( | Camera * | cam | ) |
Sets the active lod cam to use. Serves as a reference for selecting LOD during a pass.
| cam | The camera to use. |
| void nkGraphics::CameraManager::setDefaultCamera | ( | Camera * | cam | ) |
Sets the default cam to use when no camera is specified for a pass.
| cam | The camera to use. |
| void nkGraphics::CameraManager::resetRenderCameraToDefault | ( | ) |
Resets the rendering cam to the default one.
| void nkGraphics::CameraManager::resetCullingCameraToDefault | ( | ) |
Resets the culling cam to the default one.
| void nkGraphics::CameraManager::resetLodCameraToDefault | ( | ) |
Resets the LOD cam to the default one.
| void nkGraphics::CameraManager::prepareForContext | ( | RenderContext * | context | ) |
Prepare the active cameras with the ones that have been set for a context.
| context | The context that should populate the active cameras. |